<template>
	<view class="container-white">
		<view style="background: #EDEDED;padding: 10upx 20upx;">
			<view style="padding: 10upx;width: 690upx;background: #FFFFFF;border-radius: 10upx;">
				<input class="m-input" type="text" clearable v-model="name" placeholder="请输入账号" confirm-type="search" placeholder-class="m-input"></input>
			</view>
		</view>
		<view style="padding: 20upx;">
			<t-table style="">
				<t-tr>
					<t-th>序号</t-th>
					<t-th>姓名</t-th>
					<t-th>部门</t-th>
					<t-th>完成情况</t-th>
				</t-tr>
				<t-tr v-for="(item,index) in dataList" :key="index">
					<t-td>{{ index + 1 }}</t-td>
					<t-td>{{ item.realname }}</t-td>
					<t-td>{{ item.deptName }}</t-td>
					<t-td>{{ item.hobby }}</t-td>
				</t-tr>
			</t-table>
		</view>
	</view>
</template>

<script>
	import { post_md5 } from '../../common/request'
	export default {
		data() {
			return {
				dataList:[],
				id:null,
				name:''
			}
		},
		onLoad(options) {
			this.id = options.id
			// this.getData()
		},
		methods:{
			getData(){
				const params = {
					trainId: this.id,
					realname: this.name
				}
				post_md5('/train/trainTestInfos',params).then(res=>{
					console.log(res)
					this.dataList = res.data
				})
			}
		}
	}
</script>

<style>
	.m-input{
		font-size: 24upx;
		text-align: center;
	}
</style>
